package com.hexinfo.dmpro.dev.data.transfer.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

@AllArgsConstructor
public enum DevDataTransferExportTaskStatusEnum {

    incomplete("未完成", "incomplete"),

    complete("已完成", "complete"),

    suspend("暂停", "suspend"),

    abolish("中止", "abolish");

    @Getter
    private final String name;

    @Getter
    private final String value;

    public static List<String> getValues() {
        return Arrays.stream(DevDataTransferExportTaskStatusEnum.values()).map(DevDataTransferExportTaskStatusEnum::getValue).collect(Collectors.toList());
    }

    public static DevDataTransferExportTaskStatusEnum getByValue(String value) {
        return DevDataTransferExportTaskStatusEnum.valueOf(value);
    }
}
